/*
 * Physic.cpp
 *
 *  Created on: 2011-02-20
 *      Author: Basse
 */

#include "Physic.h"

void Physic::applyGravity(Unit* u, short gravity)
{

	u->setVelocityY((u->getVelocityY())+gravity*u->getWeight());

}

void Physic::applyFriction(Unit* u, short friction)
{
	u->setVelocityX((u->getVelocityX())-friction*u->getWeight());
}
